package com.jueling.culture.core;

import lombok.Data;

/**
 * 统一API响应结果封装
 * @author linp
 */
@Data
public class Result {
    private int code;
    private String msg;
    private Object data;

    public Result (ResultCode resultCode) {
        this.code = resultCode.getCode();
        this.msg = resultCode.getMsg();
    }

    public Result setResultMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Result setResultData(Object data) {
        this.data = data;
        return this;
    }
}
